All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.app.image.ImageViewer
java.lang.Object
|
+----quicktime.app.image.ImageViewer
- public abstract class ImageViewer
- extends Object
- implements QTDrawable, ImageSettable
This class presents a sequence of Images that a user can view
by simply clicking the mouse, or option clicking to view backwards.
It takes an ImageSequencer object as its source images, and uses
an ImagePresenter object internally to present the current image.
-
imagePresenter
- This is the ImagePresenter object that presents the current image.
-
ImageViewer(ImageSequencer)
- Creates a viewer for a sequence of images.
-
addedTo(Object)
- This method is called by the specified object when the instance of
the class that implements this interface is added to the object
that is the source of the interest.
-
getClip()
- This method allows you to get the current clipped Region of the QTDrawable.
-
getDisplayBounds()
- QTCanvas calls this method when it needs to ask the client for its boundary.
-
getGraphicsMode()
- This gets the current GraphicsMode for the compositor.
-
getGWorld()
- QTCanvas calls this method to get the destination QDGraphics of its client.
-
getImages()
- Returns the current collection of images that the Viewer is presenting
-
getInitialSize()
- This method returns the original size before the transformations
specified in the returned matrix are applied.
-
getMatrix()
- This will return the client's current display transformations
-
redraw(Region)
- QTCanvas calls this method when the client should redraw itself.
-
removedFrom(Object)
- This method is called by the specified object when the instance of
the class that implements this interface is removed from the object
that is the source of the interest.
-
setClip(Region)
- This method allows you to set a QTDrawable's clipping region.
-
setDisplayBounds(QDRect)
- QTCanvas calls this method when it needs to tell the client to adjust its
location, width and/or height.
-
setGraphicsMode(GraphicsMode)
- This sets the GraphicsMode for the Compositor when it draws its composited
contents to its destination QDGraphics (typically the QTCanvas).
-
setGWorld(QDGraphics)
- QTCanvas calls this method to give the client the QDGraphics object it should
use to do its drawing.
-
setImageData(EncodedImage, ImageDescription)
- This can be used by subclasses to change the Image that the viewer is presenting.
-
setImages(ImageSequencer)
- Sets a new sequence of images for the viewer to present.
-
setLocation(int, int)
- A convenience method to set the position of a QTDrawable object.
-
setMatrix(Matrix)
- This method sets the current matrix of the Transformable object to
the new matrix.
imagePresenter
protected ImagePresenter imagePresenter
- This is the ImagePresenter object that presents the current image.
ImageViewer
public ImageViewer(ImageSequencer images) throws QTException
- Creates a viewer for a sequence of images.
getImages
public ImageSequencer getImages()
- Returns the current collection of images that the Viewer is presenting
setImageData
public void setImageData(EncodedImage imageData,
ImageDescription desc) throws QTException, StdQTException
- This can be used by subclasses to change the Image that the viewer is presenting.
setImages
public void setImages(ImageSequencer images) throws QTException
- Sets a new sequence of images for the viewer to present. The viewer will always
display the currentImage, so if you want to have a particular setting for this
a subclass can overide this method, set the currentImage on the incoming images
and then call super.setImages(images).
addedTo
public void addedTo(Object interest)
- This method is called by the specified object when the instance of
the class that implements this interface is added to the object
that is the source of the interest. In this class it does nothing.
- Parameters:
- interest - the object that is to be the source of interest for the
the object that implements this interface.
removedFrom
public void removedFrom(Object interest)
- This method is called by the specified object when the instance of
the class that implements this interface is removed from the object
that is the source of the interest. In this class it does nothing.
- Parameters:
- interest - the object that was the source of interest for the
the object that implements this interface.
setGWorld
public void setGWorld(QDGraphics cgp) throws QTException
- QTCanvas calls this method to give the client the QDGraphics object it should
use to do its drawing. If the incoming QDGraphics is the QDGraphics.scratch then
the drawable will not be visible and can disable itself.
If a client is unable to set the graphics world it should throw an exception.
- Parameters:
- cgp - a QDGraphics object
getGWorld
public QDGraphics getGWorld()
- QTCanvas calls this method to get the destination QDGraphics of its client.
- Returns:
- a QDGraphics object or null
setDisplayBounds
public void setDisplayBounds(QDRect bounds) throws StdQTException
- QTCanvas calls this method when it needs to tell the client to adjust its
location, width and/or height. All values are in pixels.
- Parameters:
- bounds - the new size and location.
setLocation
public void setLocation(int x,
int y) throws QTException
- A convenience method to set the position of a QTDrawable object.
- Parameters:
- x - the new x location
- y - the new y location
getDisplayBounds
public QDRect getDisplayBounds()
- QTCanvas calls this method when it needs to ask the client for its boundary.
All values are in pixels.
- Returns:
- the boundary of the client
setClip
public void setClip(Region theClip) throws QTException
- This method allows you to set a QTDrawable's clipping region.
- Parameters:
- theClip - a Region that defines the new clipping region.
getClip
public Region getClip() throws QTException
- This method allows you to get the current clipped Region of the QTDrawable.
- Returns:
- the clipping region
getInitialSize
public Dimension getInitialSize() throws QTException
- This method returns the original size before the transformations
specified in the returned matrix are applied.
- Returns:
- the original size before the transformations
getMatrix
public Matrix getMatrix() throws StdQTException
- This will return the client's current display transformations
- Returns:
- the display transformations of the client
setMatrix
public void setMatrix(Matrix matrix) throws QTException
- This method sets the current matrix of the Transformable object to
the new matrix.
- Parameters:
- matrix - the new matrix
setGraphicsMode
public void setGraphicsMode(GraphicsMode mode) throws QTException
- This sets the GraphicsMode for the Compositor when it draws its composited
contents to its destination QDGraphics (typically the QTCanvas).
- Parameters:
- mode - the Graphics mode for the Compositor
getGraphicsMode
public GraphicsMode getGraphicsMode()
- This gets the current GraphicsMode for the compositor.
- Returns:
- current GraphicsMode for the compositor
redraw
public final synchronized void redraw(Region invalidRgn) throws QTException
- QTCanvas calls this method when the client should redraw itself.
If the canvas is able to discern that only a part of the client's
drawing area needs to be redrawn - then this area shall be passed in
using the invalidRgn. Otherwise this will be null in which case the
client should redraw itself entirely.
- Parameters:
- invalidRgn - the invalidRgn that the client should redraw
All Packages Class Hierarchy This Package Previous Next Index